using System;
using System.Collections.Generic;
using System.Text;

namespace Attach
{
    public class ReturnDelegateResult : Return
    {
        private DelegateActionDelegate _actionDelegate;

        public delegate object DelegateActionDelegate(object[] parameters);

        public ReturnDelegateResult(DelegateActionDelegate actionDelegate)
        {
            _actionDelegate = actionDelegate;
        }

        public override object GetReturnValue(object[] parameters)
        {
            return _actionDelegate(parameters);
        }
    }
}
